#include <iostream>

using namespace std;

int main() {
    int num[9];
    int height;
    int count=0;
    //苹果到地面的高度
    for (int i = 0; i < 10; ++i) {
        scanf("%d", &num[i]);
    }
    //陶陶到地面的最大高度
    scanf("%d", &height);
    int height_tool = 30 + height;
    //比较
    for (int i = 0; i < 10; ++i) {
        if (!(num[i] > height && num[i] > height_tool)){
            count++;
        }
    }
    printf("%d",count);
    return 0;
}
